package imu.ming.spring.ioc;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;


public class example{
    public static void main(String[] args){
        ApplicationContext context=new
                ClassPathXmlApplicationContext("moAttack.xml");
        MoAttack moattack=(MoAttack)context.getBean("moAttack");//依赖注入
        moattack.cityGateAsk();


        Director director=new Director();
        director.direct1();//构造注入
        director.direct2();//属性注入
        director.direct3();//依赖注入
    }
}